<?=View::factory('admin/common/header')?>
<div id="content">
  <div class="breadcrumb">
    <a href="<?=URL::site('admin')?>">管理首页</a>
    &raquo; 权限资源
  </div>
  <?=View::factory('admin/common/message')?>
  <div class="box">
    <div class="heading">
      <h1><img src="<?=URL::site()?>images/admin/user-group.png" alt="" /> 权限资源</h1>
      <div class="buttons">
        <input type="button" onclick="location='<?=URL::site('admin/manager_resource/add')?>';" class="btn45" value="添加" />
      </div>
    </div>
    <div class="content">
    <table class="list">
      <thead>
        <tr>
          <td class="center" width="60">ID</td>
          <td class="left" width="50%">资源名称</td>
          <td class="center" width="20%">排序</td>
          <td class="right">操作</td>
        </tr>
      </thead>
      <tbody>
        <? foreach ($resources as $resource) { ?>
        <tr>
          <td class="center"><?=$resource['res_id']?></td>
          <td class="left"><?=$resource['res_name']?></td>
          <td class="center"><?=$resource['sort_order']?></td>
          <td class="right">
            [ <a href="<?=URL::site('admin/manager_resource/edit/'.$resource['res_id'])?>">编辑</a> ]
            [ <a href="javascript: $.ajax_get({url:'<?=URL::site('admin/manager_resource/del/'.$resource['res_id'])?>'}); void(0);" class="delete">删除</a> ]
          </td>
        </tr>
        <? } ?>
      </tbody>
    </table>
    </div>
  </div>
</div>
<?=View::factory('admin/common/footer')?>
<script type="text/javascript">
$().ready(function(){
    $('#system').addClass('selected');
});
</script>